package com.xuanwoa.rabbit.domain;

import lombok.*;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

/**
 * Description
 *
 * @author: caomin
 * @since: 2020/11/30
 */
@Data(staticConstructor = "of")
public class User {
    public static void main(String[] args) {
        try {
            @Cleanup User user = new User();
            throw new NullPointerException();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    private Long id;
    private String name;
    private boolean flag;

    public void close() {
        System.out.println("closed resource");
        throw new RuntimeException("test");
    }
}
